<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <title>实例: 使用伪类选择器</title>
    <style>
        a.homepage:link,
        a.homepage:visited {
            padding: 1px 10px 1px 10px;
            color: #fff;
            background: red;
            border-radius: 3px;
            border: 1px outset rgba(50, 50, 50, .5);
            font-family: georgia, serif;
            font-size: 14px;
            font-style: italic;
            text-decoration: none;
        }

        a.homepage:hover,
        a.homepage:focus,
        a.homepage:active {
            background-color: #666;
        }
    </style>
</head>

<body>
    <p>Go to our <a class="homepage" href="http://www.example.com/" title="Home page">Home page</a>.</p>
</body>

</html>